package com.mall.common.utils;

import cn.hutool.core.util.StrUtil;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @Description:  String 工具类
 * @Author: wj
 * @Version: 1.0
 */
public class StringStrUtils extends StrUtil {

    /**
     * @Description 字符串去重
     * @Author wj
     * @Version 1.0
     */
    public static String strDeduplication(String str){
        String[] split = str.split(",");
        String result = Arrays.stream(split).sorted().distinct().collect(Collectors.joining(","));
        return result;
    }

}
